ARG MANAGER_VERSION="10.2.4"

FROM node:20-alpine@sha256:c0a3badbd8a0a760de903e00cedbca94588e609299820557e72cba2a53dbaa2c

WORKDIR /usr/app

# install the desired package manager
RUN npm i -g "npm@$MANAGER_VERSION"

# initialize the package.json using the manager
RUN npm init -y

# install a few dependencies at specific versions
RUN npm i mkdirp@0.5.0
RUN npm i -d cryo@0.0.6

# ensure that we finish fully installed
RUN npm install
